/* MSGR Reloaded website. Same sky, glass and glossy buttons as the account
   pages that msgr-server draws, so moving between them feels like one site. */

:root {
    color-scheme: light;
    --ink: #12305c;
    --soft: #4f6584;
    --frame: #164f99;
    --link: #0d55c4;
    --focus: #3d7bd9;
    --rule: #c3d3ea;
    --heading: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    background: url(/assets/sky.svg) center / cover fixed,
                linear-gradient(#0a3f95 0%, #2a7fda 46%, #8fd0ff 82%, #d4efff 100%) #2f86de fixed;
}

body {
    margin: 0;
    color: var(--ink);
    font: 15px/1.6 "Segoe UI", Tahoma, Verdana, "DejaVu Sans", sans-serif;
}

a { color: var(--link); }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; height: auto; }

.skip { position: absolute; left: -999px; top: 8px; padding: 6px 12px; background: #fff; border-radius: 4px; }
.skip:focus { left: 8px; z-index: 10; }

/* Top bar: a strip of the window title bar. */

.bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px;
    max-width: 1112px; margin: 0 auto; padding: 14px 16px;
}
.brand {
    display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none;
    font: 18px/1 var(--heading); text-shadow: 0 0 6px rgba(4, 30, 80, .9), 0 1px 1px rgba(4, 30, 80, .7);
}
.brand img { filter: drop-shadow(0 1px 2px rgba(4, 30, 80, .5)); }
.bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.bar nav a {
    padding: 4px 12px; border-radius: 999px; color: #fff; text-decoration: none; font-size: 14px;
    text-shadow: 0 0 5px rgba(4, 30, 80, .9), 0 1px 1px rgba(4, 30, 80, .7);
}
.bar nav a:hover { background: rgba(255, 255, 255, .16); }
.bar nav a[aria-current="page"] {
    background: rgba(255, 255, 255, .24); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .45);
}
.bar nav a.coffee { box-shadow: inset 0 0 0 1px rgba(255, 214, 120, .8); }
.bar nav a.coffee::before { content: "\2615\FE0E"; margin-right: 5px; }
.bar nav a.signup {
    margin-left: 6px; font-weight: 600; text-shadow: 0 1px 1px rgba(0, 40, 0, .45);
    border: 1px solid #2b7a17;
    background: linear-gradient(#d2f8b4 0%, #8fdb5c 48%, #4fb02a 52%, #3f9e22 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

main { max-width: 1112px; margin: 0 auto; padding: 8px 16px 32px; }

/* Buttons: the account pages' glossy pills. */

.button {
    display: inline-block; padding: 8px 26px; font: inherit; font-weight: 600; color: #fff;
    text-decoration: none; text-align: center; text-shadow: 0 1px 1px rgba(0, 40, 0, .45);
    border: 1px solid #2b7a17; border-radius: 999px;
    background: linear-gradient(#d2f8b4 0%, #8fdb5c 48%, #4fb02a 52%, #3f9e22 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 2px rgba(20, 60, 10, .3);
}
.button.blue {
    border-color: #164f99; text-shadow: 0 1px 1px rgba(0, 20, 70, .5);
    background: linear-gradient(#cfe8ff 0%, #7ab8f5 48%, #3a86e0 52%, #2a6fcb 100%);
}
.button.coffee {
    border-color: #a8600a; color: #4a2700; text-shadow: 0 1px 0 rgba(255, 240, 200, .6);
    background: linear-gradient(#ffeec2 0%, #ffc95e 48%, #f5a623 52%, #e8920f 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 2px rgba(90, 50, 0, .3);
}
.button:hover { filter: brightness(1.07) saturate(1.1); }
.button:active { filter: brightness(.94); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .25); }

/* Home: the hero sits right on the sky, with the app's own windows. */

.hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: center;
    min-height: 600px; padding: 24px 0 64px;
}
.hero-text { color: #fff; text-shadow: 0 1px 2px rgba(4, 30, 80, .55); }
.hero h1 {
    margin: 0 0 18px; color: #fff; font: normal 54px/1.05 var(--heading); letter-spacing: -.5px;
    text-shadow: 0 0 18px rgba(255, 255, 255, .35), 0 2px 3px rgba(4, 30, 80, .55);
}
.hero .lead { max-width: 30em; margin: 0 0 26px; font-size: 18px; line-height: 1.55; }
.hero a { color: #fff; }
.hero-account { margin: 18px 0 0; font-size: 15px; }
.hero-support { margin: 6px 0 0; font-size: 15px; }

.hero-shots { position: relative; aspect-ratio: 700 / 640; }
.hero-shots img {
    position: absolute; border-radius: 7px;
    filter: drop-shadow(0 18px 30px rgba(6, 34, 84, .45)) drop-shadow(0 2px 4px rgba(6, 34, 84, .3));
    animation: rise .6s cubic-bezier(.2, .8, .3, 1) both;
}
/* Same scale for both: 300 and 480 pixels wide on a 700-wide stage. */
.shot-list { left: 0; top: 0; width: 42.86%; }
.shot-chat { left: 31.43%; top: 12.5%; width: 68.57%; animation-delay: .12s; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* Download lists. In the hero, buttons sit on the sky with white notes;
   in a panel, they're a list with dark notes. */

.downloads { margin: 0; padding: 0; list-style: none; }
.downloads li { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.downloads .button { flex: none; width: 250px; padding-left: 12px; padding-right: 12px; }
.downloads span { color: var(--soft); font-size: 13px; line-height: 1.45; }
.downloads.compact li { gap: 14px; }
.downloads.compact span { color: #eaf4ff; }

/* Content panels: a large window pane. */

.panel {
    position: relative; padding: 40px 48px 44px; border-radius: 9px;
    border: 1px solid rgba(9, 44, 102, .6);
    background: linear-gradient(#fbfdff 0, #eef4fc 420px, #e2ebf8 100%);
    box-shadow: 0 0 0 6px rgba(170, 205, 245, .35), 0 0 0 7px rgba(9, 44, 102, .35),
                0 24px 60px rgba(6, 34, 84, .35);
}
.panel section + section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--rule); }

/* Donations: a warm strip at the end of the home page. */

.panel section.support {
    display: flex; align-items: center; gap: 24px; margin-top: 40px; padding: 22px 26px;
    border: 1px solid #e6c27a; border-radius: 7px;
    background: linear-gradient(#fffaf0, #fff0d2);
}
.support h2 { margin: 0 0 6px; }
.support p { margin: 0; max-width: 36em; }
.support .button { flex: none; }

h1, h2, h3 { font-weight: normal; color: var(--frame); font-family: var(--heading); }
.panel h1 { margin: 0 0 20px; font-size: 34px; line-height: 1.15; }
.panel h2 { margin: 0 0 14px; font-size: 26px; line-height: 1.2; }
.panel h3 { margin: 24px 0 6px; font-size: 18px; }
p { margin: 0 0 14px; }
.note { color: var(--soft); font-size: 14px; }

.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; font-size: 16px; }

/* Features, each with a little glossy "online" dot. */

.features {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 40px;
    margin: 0 0 22px; padding: 0; list-style: none;
}
.features li { position: relative; padding-left: 26px; }
.features li::before {
    content: ""; position: absolute; left: 2px; top: .38em; width: 13px; height: 13px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e4ffd0 0, #8fdb5c 40%, #3c9e21 100%);
    box-shadow: 0 0 0 1px #2a7314, inset 0 -1px 1px rgba(0, 40, 0, .25);
}
.features b { color: var(--frame); }

/* Help and FAQ: reading width. */

.prose { max-width: 820px; margin: 0 auto; }
.prose section { max-width: 68ch; }
.prose section + section { max-width: none; }
.prose section > * { max-width: 68ch; }

.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.toc a {
    padding: 3px 12px; font-size: 13px; text-decoration: none; border: 1px solid var(--rule);
    border-radius: 999px; background: #fff;
}
.toc a:hover { border-color: var(--focus); }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; margin-bottom: 14px; padding-left: 42px; counter-increment: step; }
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px;
    border-radius: 50%; color: #fff; font: bold 14px/28px var(--heading); text-align: center;
    text-shadow: 0 1px 1px rgba(0, 20, 70, .5); border: 1px solid #164f99;
    background: linear-gradient(#cfe8ff 0%, #7ab8f5 48%, #3a86e0 52%, #2a6fcb 100%);
}

dl { margin: 0; }
dt { margin-top: 16px; font-weight: 600; color: var(--frame); }
dd { margin: 4px 0 0; }

code {
    font: 14px Consolas, "DejaVu Sans Mono", monospace; color: var(--ink); background: #fff;
    border: 1px solid var(--rule); border-radius: 2px; padding: 0 4px; overflow-wrap: anywhere;
}
pre { margin: 0 0 14px; overflow-x: auto; }
pre code { display: block; padding: 10px 12px; }

.more { margin: 36px 0 0; padding-top: 20px; border-top: 1px solid var(--rule); }

/* Service status: a presence dot per service, as in the contact list. */

.status-summary { margin: 0 0 22px; font: 20px/1.3 var(--heading); }
.status-summary.up { color: #2a7314; }
.status-summary.down { color: #a3281a; }
.services { margin: 0 0 18px; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.services li {
    display: grid; grid-template-columns: 16px 1fr auto; gap: 12px; align-items: center;
    padding: 12px 4px; border-bottom: 1px solid var(--rule);
}
.services .dot { width: 13px; height: 13px; border-radius: 50%; }
.services .up .dot {
    background: radial-gradient(circle at 35% 30%, #e4ffd0 0, #8fdb5c 40%, #3c9e21 100%);
    box-shadow: 0 0 0 1px #2a7314;
}
.services .down .dot {
    background: radial-gradient(circle at 35% 30%, #ffd9d0 0, #f0806a 40%, #bf321c 100%);
    box-shadow: 0 0 0 1px #8c1d12;
}
.services .service span { display: block; color: var(--soft); font-size: 14px; }
.services .service b { color: var(--frame); font-weight: 600; }
.services .state { font-size: 14px; font-weight: 600; }
.services .up .state { color: #2a7314; }
.services .down .state { color: #a3281a; }

.checksums { margin: 0 0 14px; padding: 0; list-style: none; }
.checksums li { margin-bottom: 10px; }
.checksums b { display: block; font-weight: 600; }
.checksums code { display: block; padding: 4px 6px; font-size: 13px; }

/* Footer, back on the sky. */

.foot {
    max-width: 820px; margin: 0 auto; padding: 8px 16px 40px; text-align: center; font-size: 13px;
    color: #0d2f5f;
}
.foot a { margin: 0 6px; color: #0d2f5f; }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; min-height: 0; padding-bottom: 32px; }
    .hero-shots { max-width: 560px; width: 100%; margin: 0 auto; }
    .columns, .features { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    body { font-size: 15px; }
    .bar { justify-content: center; }
    .bar nav { justify-content: center; }
    .hero h1 { font-size: 38px; }
    .hero .lead { font-size: 16px; }
    .downloads li { flex-direction: column; align-items: stretch; gap: 4px; margin-bottom: 16px; }
    .downloads .button { width: auto; }
    .panel section.support { flex-direction: column; align-items: stretch; padding: 18px; }
    .downloads span { margin-left: 4px; }
    .panel { padding: 26px 18px 30px; box-shadow: 0 0 0 4px rgba(170, 205, 245, .35), 0 16px 40px rgba(6, 34, 84, .3); }
    .panel h1 { font-size: 28px; }
    .panel h2 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-shots img { animation: none; }
}
