/* EOLware - Windows Phone "Metro" tiles with a touch of Aero. Flat colour tiles, thin lowercase type, glass highlights. */
:root {
  --g: 6px;
  --u: calc((100vw - 28px - 3 * 6px) / 4);   /* one small tile; 4 columns on a phone */
  --cols: 4;
  --text: #fff;
  --blue: #0a63b8; --green: #3f9a1a; --orange: #e0701e; --purple: #7a3fb0; --teal: #0f8d8d; --red: #c42a3a; --pink: #c2347e;
}
@media (min-width: 640px) { :root { --u: 120px; --cols: 5; } }
@media (min-width: 960px) { :root { --u: 140px; --cols: 6; } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: #07305f; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", "Segoe WP", "Helvetica Neue", Arial, sans-serif; color: var(--text);
  background: linear-gradient(#0c5ca8 0%, #0a4f93 45%, #07305f 100%); background-attachment: fixed;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* aero sky: soft bubbles drifting behind the flat tiles */
.sky { position: fixed; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.b { position: absolute; border-radius: 50%; background: radial-gradient(circle at 30% 28%, rgba(255,255,255,.55), rgba(255,255,255,.10) 55%, rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.25); animation: drift 26s ease-in-out infinite alternate; }
.b1 { width: 260px; height: 260px; left: -70px; top: 12%; }
.b2 { width: 150px; height: 150px; right: 6%; top: 34%; animation-duration: 21s; }
.b3 { width: 340px; height: 340px; right: -110px; bottom: 8%; animation-duration: 32s; }
.b4 { width: 90px; height: 90px; left: 22%; bottom: 14%; animation-duration: 18s; }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(24px, -40px); } }

.wrap { position: relative; z-index: 1; width: calc(var(--u) * var(--cols) + var(--g) * (var(--cols) - 1)); max-width: 100%; margin: 0 auto; padding: 0 0 30px; }
@media (max-width: 639px) { .wrap { width: 100%; padding: 0 14px 30px; } }

.head { padding: 34px 0 10px; }
.head h1 { margin: 0; font-weight: 200; font-size: 64px; line-height: 1; letter-spacing: -1px; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.head p { margin: 6px 0 0; font-weight: 300; font-size: 17px; opacity: .85; }
@media (max-width: 639px) { .head h1 { font-size: 52px; } }

h2 { margin: 26px 0 10px; font-weight: 300; font-size: 26px; letter-spacing: .2px; }

.tiles { display: flex; flex-wrap: wrap; gap: var(--g); }
.note { opacity: .85; font-weight: 300; padding: 8px 0; }

/* tiles */
.tile { position: relative; display: block; overflow: hidden; width: var(--u); height: var(--u); padding: 10px 11px; background: var(--blue); color: var(--text); transition: transform .12s ease; }
.tile:active { transform: scale(.96); }
.tile.t2 { width: calc(var(--u) * 2 + var(--g)); }
.tile.t4 { width: calc(var(--u) * 4 + var(--g) * 3); height: calc(var(--u) * 2 + var(--g)); }
@media (min-width: 640px) { .tile.t4 { width: calc(var(--u) * 3 + var(--g) * 2); } }
.tile.tall { height: calc(var(--u) * 2 + var(--g)); }
.tile b { display: block; font-weight: 300; font-size: 22px; line-height: 1.15; }
.tile .sub { display: block; margin-top: 4px; font-size: 13px; font-weight: 300; opacity: .9; }
.tile.green { background: var(--green); } .tile.blue { background: var(--blue); } .tile.orange { background: var(--orange); }
.tile.purple { background: var(--purple); } .tile.teal { background: var(--teal); } .tile.red { background: var(--red); } .tile.pink { background: var(--pink); }
/* aero glass highlight on the top half */
.gloss { position: absolute; left: 0; right: 0; top: 0; height: 46%; background: linear-gradient(rgba(255,255,255,.22), rgba(255,255,255,.04)); pointer-events: none; }
.tile.ghost { background: rgba(255,255,255,.10); border: 1px dashed rgba(255,255,255,.45); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.ghost .plus { font-size: 44px; font-weight: 200; line-height: 1; } .ghost b { font-size: 16px; }

/* live tiles: two faces that slide */
.live .face { position: absolute; left: 0; top: 0; right: 0; bottom: 0; padding: 14px 16px; display: flex; flex-direction: column; justify-content: flex-end; }
.live .f1 { animation: face1 9s infinite; }
.live .f2 { animation: face2 9s infinite; background: rgba(0,0,0,.18); justify-content: center; }
@keyframes face1 { 0%, 40% { transform: translateY(0); } 50%, 90% { transform: translateY(-100%); } 100% { transform: translateY(0); } }
@keyframes face2 { 0%, 40% { transform: translateY(100%); } 50%, 90% { transform: translateY(0); } 100% { transform: translateY(100%); } }
.live:hover .f1, .live:hover .f2, .live:active .f1, .live:active .f2 { animation-play-state: paused; }
.live b { font-size: 34px; font-weight: 200; }
.lbl { font-size: 12px; text-transform: lowercase; opacity: .85; letter-spacing: .6px; margin-bottom: 6px; }
.liveText { font-size: 18px; font-weight: 300; line-height: 1.25; max-height: 6.2em; overflow: hidden; }
.ico { position: absolute; right: 14px; top: 12px; width: 60px; height: 60px; opacity: .95; }
.ico-aero { border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff, rgba(255,255,255,.35) 38%, rgba(255,255,255,.1) 70%); border: 2px solid rgba(255,255,255,.7); }
.ico-shop { border: 3px solid #fff; border-radius: 4px; }
.ico-shop:after { content: ""; position: absolute; left: 14px; top: -14px; width: 22px; height: 18px; border: 3px solid #fff; border-bottom: 0; border-radius: 12px 12px 0 0; }

/* post tiles */
.post { padding: 10px 11px 8px; display: flex; flex-direction: column; }
.post .who { display: flex; align-items: center; font-size: 12px; font-weight: 400; opacity: .95; }
.post .av { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.35) center / cover no-repeat; margin-right: 6px; flex: none; }
.post .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post .txt { margin-top: 7px; font-size: 15px; font-weight: 300; line-height: 1.28; overflow: hidden; flex: 1; word-wrap: break-word; }
.post .meta { font-size: 11.5px; opacity: .85; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post.t2 .txt { font-size: 14px; }

/* app tiles */
.app { padding: 0; }
.app .icon { position: absolute; left: 0; top: 0; right: 0; bottom: 34px; background: center / contain no-repeat; margin: 12px; }
.app .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 9px 7px; background: rgba(0,0,0,.28); }
.app .cap b { font-size: 13.5px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app .cap .sub { margin: 1px 0 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app.noicon .icon { display: flex; align-items: center; justify-content: center; font-size: 44px; font-weight: 200; background: none; }

.foot { margin-top: 34px; font-size: 12.5px; font-weight: 300; opacity: .7; }

/* phone: post tiles are medium squares (2 per row) so the text is readable */
@media (max-width: 639px) {
  .tile.post, .tile.post.t2 { width: calc(var(--u) * 2 + var(--g)); height: calc(var(--u) * 2 + var(--g)); }
  .post .txt { font-size: 15px; }
  .tile.app { font-size: 12px; }
  .app .cap b { font-size: 11.5px; }
}

/* drawing posts: the picture is the tile */
.tile.post.art { background-size: cover; background-position: center; image-rendering: pixelated; }
.tile.post.art .who, .tile.post.art .meta { position: relative; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.tile.post.art:before { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,0) 38%, rgba(0,0,0,0) 62%, rgba(0,0,0,.5)); }
.tile.post.art .gloss { display: none; }
.tile.post.art .txt { position: relative; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
