/* PHHHOTOS - REVIVED on the web: a black page and nav, hyper green #6FC for anything you can
   tap, uppercase type with wide letter spacing (Barlow), and 3:4 loops. Class names are
   block__element with -modifier. */

:root {
  /* Already dark, so browsers' automatic dark modes leave it (and the white name tags) alone. */
  color-scheme: dark;
  --green: #66ffcc;
  --green-dim: #3f8b72;
  --page: #000;
  --panel: #1a1a1a;
  --gray: #808080;
  --nav: 50px;
}
@media (min-width: 768px) { :root { --nav: 70px; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: clip; }
body {
  font-family: Barlow, "DIN Round", Helvetica, Arial, sans-serif;
  font-weight: 500;
  color: #fff;
  background: var(--page);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: .1em;
  -webkit-text-size-adjust: none;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
h1 { margin: 0; font: inherit; }
button { font: inherit; letter-spacing: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }

.text_link { color: var(--green); }
.text_link:hover { color: var(--green-dim); }
.text_link:active { color: #fff; }

/* Nav: black, the wordmark in the middle, links either side. */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  height: var(--nav);
  background: #000;
  color: var(--gray);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 8px;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
}
.nav__section { display: flex; }
.nav__section.-right { justify-content: flex-end; }
.nav__link { text-transform: uppercase; padding: 12px; }
.nav__link.-primary { color: var(--green); }
.nav__link.-primary:hover { color: var(--green-dim); }
.nav__link.-primary.-active { color: #fff; }
.nav__link.-secondary { color: var(--gray); }
.nav__link.-get_app { color: var(--green); }
.nav__link.-get_app:hover { color: var(--green-dim); }
/* Phones have OPEN APP in the share bar, and the nav is too narrow for it. */
@media (max-width: 767px) { .nav__section.-right .nav__link, .nav__link.-wide_only { display: none; } }
/* On phones GET THE APP stays, smaller, so it fits beside the logo. */
@media (max-width: 767px) { .nav__section.-right .nav__link.-get_app { display: block; font-size: 11px; letter-spacing: .05em; padding: 12px 4px; white-space: nowrap; } }
.nav__logo {
  color: var(--green);
  font-size: 22px; letter-spacing: .18em; font-weight: 500;
  padding: 0 12px; text-align: center; white-space: nowrap;
}
/* Phones: the REVIVED half goes on a small line under the name, so the centered logo still fits. */
@media (max-width: 767px) { .nav__logo { line-height: 1; } .nav__logo_sub { display: block; font-size: 10px; letter-spacing: .3em; margin-top: 3px; } }
@media (min-width: 768px) { .nav__logo { font-size: 24px; } .nav { padding: 0 28px; } }
@media (min-width: 1100px) { .nav__logo { font-size: 30px; } }

.content { padding-top: calc(var(--nav) + env(safe-area-inset-top)); min-height: calc(100vh - 74px); }

/* The centered columns (profiles, posts, #WOW FEED) glow hyper green down both sides, fading
   out at the top and bottom. Out of flow, so they don't take grid cells. */
.grid.-skinny, .wow, .detail { position: relative; }
.grid.-skinny::before, .grid.-skinny::after, .wow::before, .wow::after, .detail::before, .detail::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 70px; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 60px, #000 calc(100% - 60px), transparent);
  mask-image: linear-gradient(transparent, #000 60px, #000 calc(100% - 60px), transparent);
}
.grid.-skinny::before, .wow::before, .detail::before { right: 100%; background: linear-gradient(to left, rgba(102, 255, 204, .3), rgba(102, 255, 204, .08) 35%, transparent); }
.grid.-skinny::after, .wow::after, .detail::after { left: 100%; background: linear-gradient(to right, rgba(102, 255, 204, .3), rgba(102, 255, 204, .08) 35%, transparent); }

/* A loop: the strip slides up a frame at a time (steps), as the original's jpeg-strip did. */
.loop { position: relative; overflow: hidden; aspect-ratio: 3 / 4; background: #262626; display: block; }
.loop__strip {
  position: absolute; top: 0; left: 0; width: 100%; height: auto; display: block;
  animation: strip calc(var(--n) * var(--ms)) steps(var(--n)) infinite;
}
@keyframes strip { to { transform: translateY(-100%); } }
.loop__strip.-still { animation: none; }
/* The GIF the server puts in a page for search engines, until app.js swaps in the strip. */
.loop__gif { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.loop.-empty { background: #262626; }
.loop__link { position: absolute; inset: 0; }
.loop__owner {
  position: absolute; right: 10px; bottom: 10px;
  background: #fff; color: #333;
  font-size: 10.5px; line-height: 1; letter-spacing: .05em; text-transform: uppercase;
  padding: 8px 9px; border-radius: 2px;
}
.loop__fade { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }

/* Grids: two across in a 480px column (profiles), wider on big screens (home). */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.grid > :nth-child(4n+1) { background: #212121; }
.grid > :nth-child(4n+2) { background: #2b2b2b; }
.grid > :nth-child(4n+3) { background: #1a1a1a; }
.grid.-skinny { max-width: 480px; margin: 0 auto; }
.grid__item.-large { grid-column: 1 / -1; }
@media (min-width: 768px) { .grid:not(.-skinny) { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .grid:not(.-skinny) { grid-template-columns: repeat(6, 1fr); } }

/* PEOPLE: profile loops, the name and post count along the bottom. */
.person { position: relative; display: block; }
.person .loop::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); }
.person__name { position: absolute; left: 12px; right: 12px; bottom: 30px; text-transform: uppercase; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.person__name img { image-rendering: pixelated; width: 15px; }
.person__count { position: absolute; left: 12px; bottom: 12px; text-transform: uppercase; font-size: 11px; color: var(--green); }

.page_header { text-align: center; text-transform: uppercase; padding: 34px 20px 28px; }
.page_header__title { font-size: 24px; }
.page_header__sub { color: var(--gray); font-size: 12px; margin-top: 10px; line-height: 1.5; }

/* #WOW's GRID / FEED switch, under the header. */
.layout_switch { display: inline-flex; margin-top: 18px; border: 1px solid #333; border-radius: 5px; overflow: hidden; }
.layout_switch__button { text-transform: uppercase; font-size: 11px; padding: 8px 16px; color: var(--green); }
.layout_switch__button:hover { color: var(--green-dim); }
.layout_switch__button.-active { background: #333; color: #fff; }

/* #WOW's FEED: the app's WOW items (WowView.swift) in a 480px column. --u is one of the app's
   points at this width (a 390pt phone fills the column), so every size below is the app's. */
.wow {
  --u: calc(min(100vw, 480px) / 390);
  --accent: var(--green);
  max-width: 480px; margin: 0 auto;
  letter-spacing: .1em;
}
.wow__item { --accent: inherit; }
.wow__grid { display: grid; grid-template-columns: 1fr 1fr; }
.wow__grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.wow__grid.-inset { padding: 0 calc(40 * var(--u)); }
.wow__photo { position: relative; overflow: hidden; }
.wow__photo_link { position: absolute; inset: 0; }
.wow__tag {
  position: absolute; right: calc(2.3 * var(--u)); bottom: calc(8 * var(--u));
  background: #fff; color: #000; border-radius: 2px;
  font-size: calc(11 * var(--u)); line-height: 1.25; text-transform: uppercase;
  padding: calc(3 * var(--u)) calc(8 * var(--u)) calc(3 * var(--u)) calc(7 * var(--u));
}
.wow__title { color: #fff; word-break: break-word; }
.wow__title.-medium { font-size: calc(11 * var(--u)); padding: calc(20 * var(--u)) calc(20 * var(--u)) 0; }
.wow__title.-large { font-size: calc(19 * var(--u)); padding: 0 calc(40 * var(--u)); }
.wow__description { color: var(--gray); font-size: calc(11 * var(--u)); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.wow__description.-regular { padding: calc(5 * var(--u)) calc(20 * var(--u)) calc(40 * var(--u)); }
.wow__description.-roundup { padding: calc(20 * var(--u)) calc(20 * var(--u)) calc(40 * var(--u)); }
.wow__description.-link_title { padding: 0 calc(40 * var(--u)) calc(20 * var(--u)); }
.wow__description.-link_no_title { padding: calc(20 * var(--u)) calc(40 * var(--u)); }
.wow__description.-accent { color: var(--accent); }
.wow__item.-regular .wow__grid.-inset { padding-top: calc(40 * var(--u)); }
.wow__link { color: var(--accent); }
.wow__button_row.-link_title { padding: calc(20 * var(--u)) calc(40 * var(--u)) calc(22.5 * var(--u)); }
.wow__button_row.-link_no_title { padding: calc(20 * var(--u)) calc(7.5 * var(--u)) 0; }
.wow__button {
  display: flex; align-items: center; justify-content: center;
  height: calc(40 * var(--u)); border-radius: 3px;
  background: var(--accent); color: #000;
  font-size: calc(11 * var(--u)); text-transform: uppercase;
}
/* Roundup: loops half the column wide in a sideways strip, 3:2 overall. */
.wow__roundup_wrap { position: relative; }
.wow__roundup { display: flex; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.wow__roundup::-webkit-scrollbar { display: none; }
.wow__roundup > .wow__photo { flex: none; width: 50%; }

/* Profile: the profile loop faded, the name and bio over it, the counts along the bottom. */
.bio { position: relative; }
.bio__text { position: absolute; left: 0; right: 0; top: 34%; text-align: center; padding: 0 20px; }
.bio__username { font-size: 24px; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
.bio__username img { image-rendering: pixelated; width: 20px; height: auto; }
.bio__real_name { color: #ccc; text-transform: uppercase; margin-top: 8px; font-size: 12px; }
.bio__bio { margin-top: 10px; font-size: 12px; word-break: break-word; }
.bio__info { position: absolute; left: 0; right: 0; bottom: 0; display: flex; padding: 16px 0; }
.bio__info__data { flex: 1; text-align: center; text-transform: uppercase; }
.bio__info__data .value { font-size: 19px; }
.bio__info__data .label { font-size: 11px; color: var(--green); margin-top: 4px; }
.bio__info__data:hover .label { color: var(--green-dim); }
.bio__info__data.-active .label { color: #fff; }
/* The tab's part of a profile: its own grid items, so the 2-across layout carries on. */
.profile_tab { display: contents; }
.profile_tab.-loading > * { opacity: .4; transition: opacity .15s; }
.tab_header {
  display: flex; justify-content: space-between; align-items: center;
  text-transform: uppercase; padding: 16px 14px; background: #0d0d0d !important; font-size: 14px;
}
.tab_header .text_link { font-size: 11px; }
.bio__follow { text-align: center; padding: 14px 0; background: #000; }

.button {
  display: inline-block;
  background: var(--green); color: #000;
  text-transform: uppercase; font-size: 12px; line-height: 1.2;
  border-radius: 5px; padding: 12px 20px;
}
.button.-gray { background: #333; color: var(--green); font-weight: 400; }
.button.-outline { background: transparent; color: var(--green); border: 1px solid var(--green); }
.button.-small { padding: 8px 14px; font-size: 10px; }

/* Post page: the loop, then the dark toolbox. Side by side on wide screens. */
.detail { max-width: 480px; margin: 0 auto; }
@media (min-width: 900px) {
  .detail { max-width: 900px; display: grid; grid-template-columns: 480px 1fr; background: var(--panel); }
}
.detail__photo { background: #000; }
.detail__toolbox { background: var(--panel); color: var(--gray); font-size: 14px; }
.detail__section { padding: 20px; }
.detail__section + .detail__section { border-top: 1px solid #262626; }
.detail__header { text-transform: uppercase; color: #fff; font-size: 16px; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.detail__header img { width: 15px; height: auto; }
.detail__meta { display: flex; gap: 20px; }
.detail__meta__thumbnail { width: 90px; flex: none; }
.detail__meta__line { text-transform: uppercase; display: block; overflow: hidden; text-overflow: ellipsis; }
.detail__meta__line.-username { font-size: 24px; line-height: 1.29; color: #fff; margin-top: .2em; display: flex; align-items: center; gap: 8px; }
.detail__meta__line.-username img { image-rendering: pixelated; width: 18px; }
.detail__meta__line.-caption { margin-top: .5em; text-transform: none; color: #ccc; word-break: break-word; }
.detail__likes__photos { display: flex; flex-wrap: wrap; gap: 0; }
.detail__likes__photos > * { width: 60px; max-width: 20%; }
.detail__likes__names { margin-top: 1em; color: #fff; text-transform: uppercase; line-height: 1.5; }
.detail__comment { margin: 0 0 12px; line-height: 1.4; }
.detail__comment .name { color: #fff; text-transform: uppercase; margin-right: 6px; }
.detail__comment .age { color: #555; font-size: 11px; margin-left: 6px; }
.detail__see_more { display: block; text-align: center; text-transform: uppercase; background: #000; padding: 22px 20px; line-height: 23px; }

.message { text-align: center; text-transform: uppercase; color: #666; padding: 120px 20px; font-size: 16px; line-height: 1.6; }

/* The phone share bar, as share_bar: Share and Open App along the bottom. */
.share_bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; gap: 10px; padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(0, 0, 0, .85), #000);
}
.share_bar[hidden] { display: none; }
.share_bar__button { flex: 1; text-align: center; height: 40px; padding: 14px 12px; letter-spacing: .05em; }
@media (min-width: 768px) { .share_bar { display: none; } }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  padding: 28px 20px calc(80px + env(safe-area-inset-bottom));
  color: var(--gray); text-transform: uppercase; font-size: 11px; background: var(--page);
}
@media (min-width: 768px) { .footer { padding-bottom: 28px; } }
.footer__quiet { color: #555; }
.footer__link { color: var(--gray); }
.footer__link:hover { color: var(--green); }

/* Privacy policy: plain reading text in a 640px column. */
.policy { max-width: 640px; margin: 0 auto; padding: 34px 20px 40px; color: #ccc; font-weight: 400; letter-spacing: .02em; line-height: 1.6; font-size: 15px; }
.policy__title { text-transform: uppercase; letter-spacing: .1em; font-weight: 500; font-size: 24px; color: #fff; margin: 0; }
.policy__date { color: var(--gray); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin: 8px 0 28px; }
.policy h2 { text-transform: uppercase; letter-spacing: .1em; font-weight: 500; font-size: 14px; color: var(--green); margin: 32px 0 10px; }
.policy p, .policy ul { margin: 0 0 12px; }
.policy ul { padding-left: 20px; }
.policy li { margin-bottom: 6px; }
.policy__question { font-weight: 500; font-size: 15px; color: #fff; margin: 22px 0 6px; letter-spacing: .02em; }
.policy b { color: #fff; font-weight: 500; }
.policy ol { margin: 0 0 12px; padding-left: 20px; }

/* Get the app: the two buttons, side by side when they fit. */
.install__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 8px; }
.install__buttons .button { letter-spacing: .1em; }
.install__note { color: var(--green); }
.install__code { margin: 22px 0 8px; }
.install__label { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--gray); margin-bottom: 8px; }
.install__row { display: flex; gap: 10px; }
.install__input {
  flex: 1; min-width: 0; height: 42px; padding: 0 12px; border-radius: 5px;
  background: #1a1a1a; border: 1px solid #333; color: #fff;
  font: inherit; font-size: 16px; letter-spacing: .15em; text-transform: uppercase;
}
.install__input:focus { outline: none; border-color: var(--green); }
.install__input::placeholder { color: #555; }
.install__error { color: #ff6b6b; margin: 10px 0 0; }

.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: var(--green); color: #000; text-transform: uppercase; font-size: 12px;
  padding: 10px 16px; border-radius: 3px; z-index: 20;
}
