/* ==========================================================================
   MinoSSH site — single stylesheet, no external dependencies.
   Light/dark aware, responsive, system font stack only.

   Sections: tokens · base · header · buttons · hero · terminal mock ·
             sections · features · screenshots · prose · contact · FAQ ·
             tables · CTA · footer · responsive
   ========================================================================== */

:root {
    --bg:            #ffffff;
    --bg-subtle:     #f5f5f7;
    --bg-elevated:   #ffffff;
    --border:        #e3e3e6;
    --border-strong: #d2d2d7;
    --text:          #1d1d1f;
    --text-muted:    #6e6e73;
    --accent:        #0a84ff;
    --accent-dark:   #0066cc;
    --accent-soft:   #eaf4ff;
    --code-bg:       #f5f5f7;
    --shadow-sm:     0 1px 2px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .04);
    --shadow-lg:     0 12px 32px rgba(0, 0, 0, .10), 0 2px 8px rgba(0, 0, 0, .06);
    --radius:        14px;
    --radius-sm:     9px;
    --maxw:          1000px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:            #000000;
        --bg-subtle:     #0d0d0f;
        --bg-elevated:   #161618;
        --border:        #2b2b2e;
        --border-strong: #3a3a3d;
        --text:          #f5f5f7;
        --text-muted:    #a1a1a6;
        --accent:        #409cff;
        --accent-dark:   #409cff;
        --accent-soft:   #10243a;
        --code-bg:       #1c1c1e;
        --shadow-sm:     0 1px 2px rgba(0, 0, 0, .5);
        --shadow-lg:     0 12px 32px rgba(0, 0, 0, .6);
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
                 Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .6em; }
h1 { font-size: 2.6rem; font-weight: 700; }
h2 { font-size: 1.7rem; font-weight: 650; }
h3 { font-size: 1.12rem; font-weight: 620; }
p  { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow    { max-width: 780px; }

/* ---------- header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .site-header { background: var(--bg); }
}
.site-header .inner {
    display: flex; align-items: center; gap: 28px;
    height: 58px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--text-muted); font-size: .95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.is-active { color: var(--text); font-weight: 550; }
.nav a.nav-download {
    color: var(--accent); border: 1px solid var(--border-strong);
    padding: 5px 13px; border-radius: 980px;
}
.nav a.nav-download:hover { background: var(--accent-soft); border-color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 980px;
    font-size: .95rem; font-weight: 550; border: 1px solid transparent;
    cursor: pointer; transition: transform .12s ease, background .15s ease;
    white-space: nowrap; font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: transparent; color: var(--accent); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--accent-soft); }

/* Button rows: centred by default, tightened up inside cards/headers. */
.actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; align-items: center; }
.hero .actions { margin-top: 4px; }

/* ---------- hero ---------- */
.hero { padding: 76px 0 40px; text-align: center; }
.hero .app-icon { width: 104px; height: 104px; margin: 0 auto 22px; border-radius: 24px; box-shadow: var(--shadow-lg); }
.hero h1 { font-size: 3rem; margin-bottom: .28em; }
.hero .lede { font-size: 1.22rem; color: var(--text-muted); max-width: 620px; margin: 0 auto 30px; }

.badges {
    display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center;
    margin: 34px 0 0; padding: 0; list-style: none;
    color: var(--text-muted); font-size: .9rem;
}
.badges li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 7px; }

/* ---------- terminal mock ----------
   A dark card in both themes — it is standing in for a real terminal window,
   so it follows the terminal's colours, not the page's. */
.section.tight { padding: 20px 0 64px; }

.terminal {
    background: #11131a;
    border: 1px solid #22262f;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28), 0 2px 8px rgba(0, 0, 0, .2);
    overflow: hidden;
    max-width: 860px; margin: 0 auto;
    text-align: left;
}
.terminal-bar {
    display: flex; align-items: center; gap: 7px;
    padding: 11px 14px;
    background: #1a1d26;
    border-bottom: 1px solid #22262f;
}
.terminal-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #3b3f4a; }
.terminal-bar .dot:nth-child(1) { background: #ff5f57; }
.terminal-bar .dot:nth-child(2) { background: #febc2e; }
.terminal-bar .dot:nth-child(3) { background: #28c840; }
.terminal-title {
    margin-left: 8px; color: #8b8f9a; font-size: .8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.terminal-body { padding: 16px 18px 10px; }
.terminal-body pre {
    margin: 0; color: #e6e6ea;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .82rem; line-height: 1.65;
    white-space: pre-wrap; word-break: break-word;
}
.t-dim  { color: #7d818c; }
.t-user { color: #7ee787; }
.t-path { color: #79c0ff; }
.t-caret {
    display: inline-block; width: .55em; height: 1.05em;
    background: #e6e6ea; vertical-align: -.18em;
    animation: caret 1.15s steps(1) infinite;
}
@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .t-caret { animation: none; } }

/* The SFTP half of the same window. */
.terminal-panes {
    border-top: 1px solid #22262f;
    background: #0d0f15;
    padding: 10px 10px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .76rem;
}
.pane-label {
    color: #6f7480; padding: 4px 8px 9px;
    border-bottom: 1px solid #1b1f28; margin-bottom: 4px;
}
.pane-row {
    display: grid; grid-template-columns: 18px 1fr auto 74px;
    gap: 8px; align-items: center;
    padding: 5px 8px; border-radius: 6px;
    color: #c9ccd4;
}
.pane-row:nth-child(2) { background: #151922; }
.pane-icon { color: #6ea8ff; }
.pane-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-meta { color: #7d818c; }
.pane-size { color: #7d818c; text-align: right; }

/* ---------- sections ---------- */
.section { padding: 60px 0; }
.section.subtle { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 42px; }
.section-head p { color: var(--text-muted); margin-bottom: 0; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--text-muted); font-size: .96rem; margin: 0; }
.card p code { font-size: .92em; }

/* ---------- checks (security list) ---------- */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li {
    position: relative; padding: 18px 0 18px 34px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted); font-size: .97rem;
}
.checks li:first-child { border-top: 1px solid var(--border); }
.checks li:last-child { border-bottom: 0; }
.checks li::before {
    content: "✓"; position: absolute; left: 4px; top: 18px;
    color: var(--accent); font-weight: 700;
}
.checks li strong { color: var(--text); display: block; margin-bottom: .15em; font-weight: 600; }

/* ---------- screenshots ---------- */
.shots { display: grid; gap: 30px; }
.shot { text-align: center; }
.shot img {
    border-radius: var(--radius); border: 1px solid var(--border);
    box-shadow: var(--shadow-lg); margin: 0 auto; width: 100%;
}
.shot figcaption { color: var(--text-muted); font-size: .92rem; margin-top: 14px; }
figure { margin: 0; }

/* ---------- prose (policy pages) ---------- */
.page-head { padding: 56px 0 8px; }
.page-head p.updated { color: var(--text-muted); font-size: .92rem; margin: 0; }

.prose section { margin-bottom: 34px; }
.prose h2 { font-size: 1.3rem; margin-bottom: .5em; }
.prose h3 { font-size: 1.02rem; margin: 1.3em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: .38em; }
.prose code, code {
    background: var(--code-bg); border: 1px solid var(--border);
    border-radius: 5px; padding: .12em .38em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .88em;
    word-break: break-word;
}

.callout {
    background: var(--accent-soft); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 22px; margin: 0 0 30px;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: .3em; }

/* ---------- contact ---------- */
.contact-box {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm);
    margin-bottom: 34px;
}
.contact-box .label { color: var(--text-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 4px; }
.contact-box .mail { font-size: 1.12rem; font-weight: 600; word-break: break-all; }
.contact-box .actions { margin-left: auto; display: flex; gap: 10px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
    cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative;
    font-weight: 550; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    font-size: 1.35rem; font-weight: 400; color: var(--text-muted); line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 0 20px; color: var(--text-muted); font-size: .97rem; }
.faq .answer p:last-child, .faq .answer ul:last-child { margin-bottom: 0; }
.faq .answer ul { padding-left: 1.2em; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; color: var(--text-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
td code { word-break: break-all; }

/* ---------- CTA band ---------- */
.cta { text-align: center; padding: 64px 0; }
.cta h2 { font-size: 1.9rem; }
.cta p { color: var(--text-muted); max-width: 560px; margin: 0 auto 26px; }

/* ---------- footer ---------- */
.site-footer {
    border-top: 1px solid var(--border); background: var(--bg-subtle);
    padding: 40px 0; color: var(--text-muted); font-size: .9rem;
}
.site-footer .rows { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
    body { font-size: 16px; }
    h1 { font-size: 2rem; }
    .hero { padding: 48px 0 28px; }
    .hero h1 { font-size: 2.15rem; }
    .hero .lede { font-size: 1.06rem; }
    .hero .app-icon { width: 84px; height: 84px; border-radius: 20px; }
    .features { grid-template-columns: 1fr; }
    .section { padding: 44px 0; }
    .site-header .inner { height: 54px; gap: 14px; }
    .nav { gap: 16px; }
    .nav a { font-size: .9rem; }
    .contact-box .actions { margin-left: 0; width: 100%; }
    .terminal-body pre { font-size: .74rem; }
    .pane-row { grid-template-columns: 16px 1fr auto; }
    .pane-size { display: none; }
    .pane-meta { font-size: .7rem; }
}

@media (max-width: 480px) {
    .nav a.nav-download { display: none; }
}

/* Tight phones: give the nav room and tidy the badge list. */
@media (max-width: 560px) {
    .container { padding: 0 16px; }
    .site-header .inner { gap: 10px; }
    .nav { gap: 12px; }
    .nav a { font-size: .86rem; }
    .badges { display: inline-grid; gap: 8px; text-align: left; margin-top: 30px; }
    .hero .actions .btn { width: 100%; justify-content: center; }
    .terminal-panes { font-size: .7rem; }
}
